Branching can refer to any point in a computer program where execution proceeds down multiple potential paths. There are a variety of types of branching in computer science. At the machine level, software assembly language instructions often contain conditional jumps. If the condition succeeds, the processor will execute code at the location specified by the jump. If the condition fails, the processor will continue executing code following the jump. Today's heavily pipelined, multi-core processors often begin speculatively executing both paths of a branch. When execution reaches the branch condition and the condition is evaluated, the processor keeps the branch taken and flushes the intermediate results of speculatively executing the other branch. Branching also occurs at the process level. Operating systems such as UNIX include application programming interfaces (API), such as fork( ) that creates a copy of a process and continues executing in a new process. This can be used for multithreading or for pursuing divergent potential paths of a process.
Testing complex systems often involves a fair amount of setup to get the system to a particular condition and then test the system's reaction to a variety of stimuli. The stimuli may include providing a variety of inputs, in the form of fuzz testing, manipulating connected hardware to test the system's reaction, and so forth. Some functions of a system may produce substantial state changes, such that it is difficult to get back to the previous condition. In other instances, complex systems may spend a long amount of time processing a batch of data only to find out that the data was not needed, or that a branch will be taken that causes the data to be unimportant.
Branching today applies at too low of a level to be helpful in these situations. Testing of complex systems and other fields need a way to start from a known state and explore multiple potential future states, without consuming too much time and requiring laborious setup. Typically today, a test harness will run multiple possible test passes serially or in more efficient cases may leverage multiple machines to run tests in parallel. This can still be time consuming, particularly if the test harness needs to get each machine to a common state to start multiple tests. For complex state evaluations, the time involved may mean less time for testing the system in as many permutations as the software developer would like, and as a result more errors in the software product.